home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / sweettim.swf / scripts / frame_8 / PlaceObject2_220_200 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2011-06-09  |  503 b   |  17 lines

  1. onClipEvent(enterFrame){
  2.    rack_status = _root.rackControl.rackStatus();
  3.    if(!childAtTill && rack_status == "full")
  4.    {
  5.       timeWait--;
  6.       if(timeWait == 0)
  7.       {
  8.          rndChild = 1 + Math.floor(Math.random() * 4);
  9.          childBagValue = _root.rackControl.getSweetbagValue();
  10.          _root.customer.gotoAndPlay("k" + rndChild + "_show");
  11.          childAtTill = true;
  12.          childType = rndChild;
  13.          timeWait = 20 + Math.floor(Math.random() * 80);
  14.       }
  15.    }
  16. }
  17.